init = {
  // start by cleaning up all the files
  ["dummy1.log.txt","dummy2.log.txt","dummy3.log.txt"].collect { new File(it) }.each { if(it.exists()) it.delete() } 
  forward null
}

hello = {

  exec """for i in 1 2 3;  do echo "Hello World $i"; sleep 2; done """
  //exec """sleep 60;for i in 1 2 3;  do echo "Hello World $i"; sleep 2; done """
}

// Make sure we fail if the executor returns fail exit code from status
fail = {
  exec "false"
}

run {
  init + hello + fail
}
